Add challenge invite links with personal codes and auto-follow#4
Merged
prazgaitis merged 5 commits intomainfrom Feb 9, 2026
Merged
Add challenge invite links with personal codes and auto-follow#4prazgaitis merged 5 commits intomainfrom
prazgaitis merged 5 commits intomainfrom
Conversation
Users who join a challenge get a personal invite link they can share. When someone joins via an invite link, the system records who invited whom and automatically creates mutual follow relationships between the inviter and invitee. An invite card is pinned to the top of the dashboard feed until the challenge starts. - Add challengeInvites table to schema for per-user invite codes - Add getOrCreateInviteCode mutation and resolveInviteCode query - Update join mutation to accept inviteCode, resolve inviter, and create mutual follows - Add /challenges/[id]/invite/[code] accept page - Add InviteCard component with copy/share functionality - Pin InviteCard above activity feed for upcoming challenges https://claude.ai/code/session_01KiAJKNHGNMPzfLtKwVCMQ6
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a personal invite link system for challenges that allows users to share unique codes with friends. When someone joins via an invite link, the system automatically records who invited them and creates mutual follow relationships.
Key Changes
Backend:
challengeInvitestable to store personal invite codes per user per challengegetOrCreateInviteCodemutation generates an 8-character alphanumeric code (idempotent)resolveInviteCodequery resolves invite codes to challenge and inviter infojoinmutation to acceptinviteCode, resolve the inviter, and auto-create mutual followsgetMyInviteCodequery to fetch existing codesFrontend:
/challenges/[id]/invite/[code]that shows challenge details and join buttonInviteCardcomponent pinned above activity feed until challenge startsFeatures
Testing
Notes
https://claude.ai/code/session_01KiAJKNHGNMPzfLtKwVCMQ6